﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;
using EIIS.FrameWork.DomainModel;

namespace EIIS.Presentation.Controllers.ViewModel
{
    public class TreeData
    {
        /// <summary>
        /// 编号
        /// </summary>
        public string id { get; set; }
        /// <summary>
        /// tree显示的名称
        /// </summary>
        public string text { get; set; }
        /// <summary>
        /// 是否展开:open,closed
        /// </summary>
        public string state { get; set; }
        /// <summary>
        /// 节点图片样式
        /// </summary>
        public string iconCls { get; set; }
        /// <summary>
        /// 子节点
        /// </summary>
        public List<TreeData> children { get; set; }

        public string ToJsonString()
        {
            JavaScriptSerializer jss = new JavaScriptSerializer();
            string sJson = jss.Serialize(this);
            return "[" + sJson + "]";
        }
    }
}
